package com.itheima.demo;

public class Demo01 {
    public static void main(String[] args) {
        useCalculator((int a,int b)->{
            System.out.println(a);//100
            System.out.println(b);//200
            return a+b;//300
        });
    }

    public static void useCalculator(Calculator calculator){
        int calc = calculator.calc(100,200);
        System.out.println("a+b="+calc);
    }
}

interface Calculator{
    int calc(int a,int b);
}
